Table of Contents
As the virtual machine will most probably expect to see a hard disk built into its virtual computer, VirtualBox must be able to present "real" storage to the guest as a virtual hard disk. There are presently three methods in which to achieve this:
Most commonly, VirtualBox will use large image files on a real hard disk and present them to a guest as a virtual hard disk. This is described in Sectioná5.2, “Virtual Disk Image (VDI) files”.
Alternatively, if you have iSCSI storage servers, you can attach such a server to VirtualBox as well; this is described in Sectioná5.5, “iSCSI servers”.
Finally, as an experimental feature, you can allow a virtual machine to access one of your host disks directly; this advanced feature is described in Sectioná9.9, “Using a raw host hard disk from a guest”.
Each such virtual storage device (image file, iSCSI target or physical hard disk) will need to be connected to the virtual hard disk controller that VirtualBox presents to a virtual machine. This is explained in the next section.
In a real PC, hard disks and CD-ROM/DVD drives are connected to a device called hard disk controller which drives hard disk operation and data transfers. VirtualBox can emulate the two most common types of hard disk controllers typically found in today's PCs: IDE and SATA.[10]
IDE (ATA) controllers have been in use since the 1980s. Initially, this type of interface worked only with hard disks, but was later extended to also support CD-ROM drives and other types of removable media. In physical PCs, this standard uses flat ribbon parallel cables with 40 or 80 wires. Each such cable can connect two devices to a controller, which have traditionally been called "master" and "slave". Typical hard disk controllers have two connectors for such cables; as a result, most PCs support up to four devices.
You can connect up to four virtual storage devices to a virtual machine. Since one of these (the secondary master) is always configured to be a CD-ROM/DVD drive, this leaves you with up to three virtual hard disks that you can attach to a virtual machine's IDE controller.
Serial ATA (SATA) is a newer standard introduced in 2003, which supports both higher speeds and more devices per hard disk controller. Also, with real hardware, devices can be added and removed while the system is running. The standard interface for SATA controllers is called Advanced Host Controller Interface (AHCI).
The main problem with AHCI controllers is that they are not supported by older operating systems out of the box. Also, for compatibility reasons, AHCI controllers by default operate the disks attached to it in a so-called IDE compatibility mode, unless SATA support is explicitly requested.
Like a real SATA controller, VirtualBox's virtual SATA controller operates faster and also consumes less CPU resources than the virtual IDE controller. Also, this allows you to connect more than three virtual hard disks to the machine. Finally, a future version of VirtualBox will also implement Native Command Queueing and may thus offer additional performance improvements over IDE.
VirtualBox will always present at least the IDE controller device to the guest. Even if your guest operating system does not support SATA (AHCI), it will always see this IDE controller and the virtual disks attached to it.
If you enable the SATA controller, this will be shown as a separate, additional PCI device to the virtual machine. VirtualBox supports up to 30 SATA slots (numbered 0-29 in the graphical user interface). Of these, the first four (numbered 0-3 in the graphical user interface) are operated in IDE compatibility mode by default. IDE compatibility mode means just that the BIOS has access to the drives. Disks assigned to those slots will operate in full-speed AHCI mode once the guest operating system has loaded its AHCI device driver.
The entire SATA controller and the virtual disks attached to it (including those in IDE compatibility mode) will only seen by operating systems that have device support for AHCI. In particular, there is no support for AHCI in Windows before Windows Vista; Windows XP (even SP2) will not see such disks unless you install additional drivers. We therefore do not recommend installing operating systems on SATA disks at this time.
This now gives you the following categories of virtual hard disk slots:
three slots attached to the traditional IDE controller, which are always present (plus one for the virtual CD-ROM device);
slots attached to the new SATA controller, provided that your guest operating system can see it; these can either be
in IDE compatibility mode (by default, slots 0-3) or
in SATA mode.
To change the IDE compatibility mode settings for the SATA controller, please see Sectioná8.5, “VBoxManage modifyvm”.